using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace CatsCompetition
{
    class CatsCompetition
    {
        static void Main()
        {
 
            int n = int.Parse(Console.ReadLine());
            int[] array = new int[11];
            int result = new int();
             
            for (int i = 0; i < n; i++)
            {
                int a = int.Parse(Console.ReadLine());
                array[a] = array[a] + 1;
 
            }
             
            for (int i = 1; i < 11; i++)
            {
                if (array[result]<array[i])
                {
                    result = i;
                }
                else;
                {
 
                }
            }
 
            Console.WriteLine(result);
 
 
 
 
        }
    }
}